package au.edu.adelaide.mips_soft_core.board_interface_pc.core;

import java.util.ArrayList;

import au.edu.adelaide.mips_soft_core.board_interface_pc.logger.Logger;

public class Core {
	
	public static final int LOG_LEVEL_MESSAGE = 1;
	public static final int LOG_LEVEL_WARNING = 2;
	public static final int LOG_LEVEL_ERROR = 3;
	
	Logger logger = new Logger(new int[]{LOG_LEVEL_MESSAGE, LOG_LEVEL_WARNING, LOG_LEVEL_ERROR}, new String[]{"Message", "Warning", "Error"});
	
	private ArrayList<Device> devices = new ArrayList<Device>();
	
	public Logger getLogger(){
		return this.logger;
	}
	
	private Core(){
		devices.add(Device.DEFAULT_BASYS2);
		devices.add(Device.DEFAULT_NEXYS2);
		devices.add(Device.DEFAULT_NEXYS3);
	}
	
	public void refreshDeviceList(){
		//do some stuff
	}
	
	public int getNumberOfDevices(){
		return this.devices.size();
	}
	
	public Device getDevice(int index){
		return this.devices.get(index);
	}
	
	private static Core coreInstance = new Core();
	
	public static Core getCore(){
		return coreInstance;
	}

}
